package org.zhaolei.controller.sys;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.zhaolei.annotation.NoLogin;
import org.zhaolei.dto.sys.MenuTreeDTO;
import org.zhaolei.service.sys.MenuService;

import java.util.List;

@Api(tags = "菜单操作", description = "菜单接口")
@RestController
@RequestMapping("/v1/menus")
public class MenuController {

    @Autowired
    private MenuService menuService;

    @NoLogin
    @ApiOperation(notes = "获取菜单树", value = "获取菜单树")
    @GetMapping("/getMenuTree")
    public List<MenuTreeDTO> getMenuTree() {
        return menuService.getMenuTree();
    }
}
